package com.myfir.util;

import java.security.MessageDigest;

import sun.misc.BASE64Encoder;

public class DegistUtil {
	public static String md5(String psw){
		try {
			MessageDigest md = MessageDigest.getInstance("MD5");
			byte[] bytes = md.digest(psw.getBytes());
			BASE64Encoder base64 = new BASE64Encoder();
			String msg = base64.encode(bytes);
			return msg;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
